using UnityEngine;
using System.Collections;

public class PlatformerControllerMovement : MonoBehaviour
{
    // The speed when walking
    public float walkSpeed = 3.0F;
    // when pressing "Fire1" button (control) we start running
    public float runSpeed = 10.0F;

    public float inAirControlAcceleration = 1.0F;

    // The gravity for the character
    public float gravity = 60.0F;
    public float maxFallSpeed = 20.0F;

    // How fast does the character change speeds?  Higher is faster.
    public float speedSmoothing = 5.0F;

    // This controls how fast the graphics of the character "turn around" when the player turns around using the controls.
    public float rotationSmoothing = 0.0F;

    // The current move direction in x-y.  This will always been (1,0,0) or (-1,0,0)
    // The next line, @System.NonSerialized , tells Unity to not serialize the variable or show it in the inspector view.  Very handy for organization!

    public Vector3 direction = Vector3.zero;

    // The current vertical speed

    public float verticalSpeed = 0.0F;

    // The current movement speed.  This gets smoothed by speedSmoothing.

    public float speed = 0.0F;

    // Is the user pressing the left or right movement keys?

    public bool isMoving = false;

    // The last collision flags returned from controller.Move

    public CollisionFlags collisionFlags;

    // We will keep track of an approximation of the character's current velocity, so that we return it from GetVelocity () for our camera to use for prediction.
    public Vector3 velocity;

    // This keeps track of our current velocity while we're not grounded?
    public Vector3 inAirVelocity = Vector3.zero;

    // This will keep track of how long we have we been in the air (not grounded)
    public float hangTime = 0.0F;

    public bool crouching = false;
    public bool walkingLeft = false;
    public bool walkingRight = false;
    public bool creeping = false;

    public bool wasWalkingLeft = false;
    public bool wasWalkingRight = false;
}
